var arr=['hello',1,true,null];
for(var i=0;i<arr.length;i++){
    var result=arr[i];
    console.log(i,result);
}
for(let index in arr){
    console.log(index,arr[index]);
}